﻿<%@ Page Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="CityMaster.aspx.cs"
    Inherits="CityMaster" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMainBody" runat="Server">
    <table class="style1">
        <tr>
            <td valign="bottom" class="leftheading" colspan="2" align="left">
                <img src="images/headingbullet.gif" width="14" height="14">
                CITY MASTER
            </td>
        </tr>
        <tr>
            <td class="leftsectionunderline" colspan="2">
                <img src="images/spacer.gif" width="1" height="1">
            </td>
        </tr>
        <tr>
            <td class="tdstyle">
                State Name
            </td>
            <td class="tdstyle">
                <asp:DropDownList CssClass="ddl" ID="ddlState" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="tdstyle">
                City Name
            </td>
            <td class="tdstyle">
                <asp:TextBox class="txt" ID="txtcityname" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tdstyle">
                <asp:Button class="CSSButton" ID="btncity" runat="server" OnClick="btncity_Click"
                    Text="Add City" />
            </td>
            <td class="tdstyle">
            </td>
        </tr>
        <tr>
            <td class="tdstyle">
            </td>
            <td class="tdstyle">
                <asp:GridView ID="grdCity" runat="server" CellPadding="4" AutoGenerateColumns="false" CssClass="griddiv"
                    ForeColor="Black" GridLines="Horizontal" OnRowCommand="grdCity_RowCommand" OnRowDataBound="grdCity_RowDataBound"
                    AllowPaging="True" OnPageIndexChanging="grdCity_PageIndexChanging">
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    
                    <Columns>
                        <asp:TemplateField HeaderText="Edit/Delete">
                            <ItemTemplate>
                                <asp:ImageButton ID="lnkEdit" ImageUrl="~\images\Edit.jpg" Height="20px" CommandName="Edt"
                                    CommandArgument='<%# Eval("ID") %>' runat="server" AlternateText="Edit"></asp:ImageButton>
                                <asp:ImageButton ID="lnkDelete" ImageUrl="~\images\delete.jpg" Height="20px" CommandName="Del"
                                    CommandArgument='<%# Eval("ID") %>' runat="server" AlternateText="Delete"></asp:ImageButton>
                            </ItemTemplate>
                        </asp:TemplateField >
                        <asp:BoundField ItemStyle-CssClass="griditem" DataField="STATE_ID" HeaderText="State" />
                        <asp:BoundField ItemStyle-CssClass="griditem" DataField="CITY" HeaderText="City Name" />
                        
                    </Columns>
                     <PagerStyle CssClass="pagingstyle" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True"  />
                    <HeaderStyle CssClass="greedhead" Font-Bold="True" />
                    
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
